// import { useUserStore } from '@/stores/userStore'
import AboutOur from '@/views/AboutOur.vue'
import AdminPage from '@/views/AdminPage.vue'
import Bidder from '@/views/Bidder.vue'
import BidderDate from '@/views/BidderDate.vue'
import BidderPage from '@/views/BidderPage.vue'
import CheckTenderer from '@/views/CheckTenderer.vue'
import File from '@/views/File.vue'
import FirstPage from '@/views/FirstPage.vue'
import JoinTenderer from '@/views/JoinTenderer.vue'
import Message from '@/views/Message.vue'
import News from '@/views/News.vue'
import OurBidder from '@/views/OurBidder.vue'
import OurTenderer from '@/views/OurTenderer.vue'
import Tenderer from '@/views/Tenderer.vue'
import TendererInfo from '@/views/TendererInfo.vue'
import TendererPage from '@/views/TendererPage.vue'
import UpdatePwd from '@/views/UpdatePwd.vue'
import { createRouter, createWebHistory } from 'vue-router'



const routes = [
  {
    path: '/TendererIndex',
    component: TendererPage,
    redirect: '/TendererIndex/bidderDate',
    children:[
      {
        path: 'bidderDate',
        component: BidderDate,
      },
      {
        path: 'message',
        component: Message,
      },
      {
        path: 'join',
        component: JoinTenderer,
      },
      {
        path: 'ourTenderer',
        component:OurTenderer,
      },
    ]
  },
  {
    path: '/bidderIndex',
    component: BidderPage,
    redirect: '/bidderIndex/bidderDate',
    children:[
      {
        path: 'bidderDate',
        component: BidderDate,
      },
      {
        path: 'ourBidder',
        component: OurBidder,
      },
      {
        path: 'message',
        component: Message,
      },

    ]
  },
  {
    path: '/admin',
    component: AdminPage,
    redirect: '/admin/some',
    children: [
      {
          path: 'some',
          component: CheckTenderer,
      },
      {
        path:'bidder',
        component:Bidder
      },
      {
        path:'tenderer',
        component:Tenderer
      },
      {
        path:'updatePwd',
        component:UpdatePwd
      },
      {
        path: 'message',
        component: Message,
      },
      {
        path: 'file',
        component: File,
      },
    ]
  },
  {
    path: '/',
    component: FirstPage,
    redirect: '/tendererInfo',
    children: [
        {
            path: 'tendererInfo',
            component: TendererInfo,
        },
        {
          path:'news',
          component:News
        },
        {
          path:'about',
          component:AboutOur
        }
    ]
}
]

//创建路由对象
const router = createRouter({
    history: createWebHistory(),
    //注册路由表
    routes: routes,
})
//导出 路由对象
export default router
